package work.MrSun.xyq.controller;

/**
 * @Author MrSun
 * @Date 2023/5/4 12:53
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import work.MrSun.xyq.model.XyqMessage;
import work.MrSun.xyq.service.XyqMessageDetailService;

import java.util.List;

/**
 * 获取评论的方法---根据访问量进行获取
 */
@RestController
public class GetHotTopicController {

    @Autowired
    private XyqMessageDetailService xyqMessageDetailService;

    /**
     * 获取今日话题(获取两条)
     * @return
     */
    @PostMapping("/getMessage/getHotTopic")
    public XyqMessage getHotTopic(){
        return xyqMessageDetailService.getHotTopic();
    }
}
